package pl.radiomaryja.softcognito;

import java.io.IOException;
import java.util.List;

import org.softcognito.webcontent.radiomaryja.ContentImpl;
import org.softcognito.webcontent.radiomaryja.ItemDTO;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

public class ArticlesListView extends Activity {
	
    private List<ItemDTO> il;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.articles_list_view);
        
        String link = this.getIntent().getStringExtra("link");
		Toast.makeText(this, "You selected: " + link, Toast.LENGTH_LONG).show();
		
        ContentImpl c = new ContentImpl();
        try {
			il = c.getCategoryContent(link);
		} catch (IOException e) {
			Log.i("CantGetContent", e.getMessage());
		}
    }
}
